(function () {
    'use strict';
    var global$7 = tinymce.util.Tools.resolve('tinymce.PluginManager');
    var setupMenuItems = function (editor) {
        editor.ui.registry.addMenuItem('limitPointCount', {
            text: 'limitPointCount',
            icon: 'new-tab',
            onAction: function (){
                var tdObject = editor.dom.getParent(editor.selection.getStart(), "td");
                editor.execCallback('updateLimitPointCount', editor,tdObject);
                editor.undoManager.add();
            }
        });
    };
    var setupContextMenu = function (editor) {
        editor.ui.registry.addContextMenu('limitPointCount', {
            update: function (element) {
                var tdObject = editor.dom.getParent(editor.selection.getStart(), "td");
                if(!tdObject) return "";
                return "limitPointCount";
            }
        });
    };
    function Plugin () {
        global$7.add('limitPointCount', function (editor) {
            setupMenuItems(editor);
            setupContextMenu(editor);
        });
    }

    Plugin();
}());